package com.vincent.dao;

import com.vincent.model.RolePermission;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component("rolePermissionMapper")
public interface RolePermissionMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(RolePermission record);

    int insertSelective(RolePermission record);

    RolePermission selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(RolePermission record);

    int updateByPrimaryKey(RolePermission record);

    List<Integer> selectPerIdByRoleId(int roleid);

    int deleteByPermissionIds(@Param("ids") Integer []ids);

    int deleteByRoleIds(@Param("ids") Integer []ids);

    int insertRolePerIs(@Param("roleId") Integer roleId, @Param("perIds") Integer []perIds);
}